trigger ApproveTutor on Tutor_Application__c (before update) {
    Tutor_Application__c app = trigger.new[0];
    User u = [select name, profileId, isTutor__c from User where utorId__c =: app.name];
    
    if (app.approved__c) {
        u.isTutor__c = true;
        update u;
        app.is_active__c = false;
    }
}